package com.ihrm.company;

import com.ihrm.common.utils.IdWorker;
import com.ihrm.common.utils.JwtUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(scanBasePackages = "com.ihrm")
@EntityScan(value = "com.ihrm.domain.company")
@EnableEurekaClient//启动eureka客户端注册到eureka注册中心
public class CompanyApplication {
	public static void main(String[] args) {
		 SpringApplication.run(CompanyApplication.class, args);
	}

	@Bean
	public IdWorker idWorker(){
		return new IdWorker();
	}


	@Bean
	public JwtUtil jwtUtils(){
		return new JwtUtil();
	}

}
